package com.wang.webSocket;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;


@Data
public class SocketMsg<T> {

    private String command;

    private String type;

    private String msg;

    private String result;

    private T data;


    public static void main(String[] args) {
        SocketMsg socketMsg = new SocketMsg();
        socketMsg.setMsg("允许登录");
        socketMsg.setCommand("login");
        socketMsg.setType("1");
        socketMsg.setResult("");
        JSONObject jsonObject = (JSONObject) JSON.toJSON(socketMsg);
        System.out.println(jsonObject);

    }


}
